package com.fjec.market.mapper;

import com.fjec.market.entity.InfoPersonal;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Param;

import java.time.LocalDateTime;
import java.util.List;
import java.util.Map;

/**
 * <p>
 * 049.个人用户表 Mapper 接口
 * </p>
 *
 * @author admin
 * @since 2020-09-24
 */
public interface InfoPersonalMapper extends BaseMapper<InfoPersonal> {

    /**
     * 统计用户数量，busiType为空时统计所有类型用户
     *
     * @param startTime
     * @return
     */
    List<Map<String, Object>> statPersonalData(@Param("startTime") LocalDateTime startTime,
                                               @Param("endTime") LocalDateTime endTime,
                                               Integer busiType);

    /**
     * 根据userId查询店铺进件状态
     * RegStatus 进件状态
     * 0=未注册商铺
     * 1=基本信息
     * 2=已完善信息
     * 3=已进件
     * <p>
     * DepoStatus 保证金状态
     * 0=未缴纳
     * 1=已缴纳
     * 2=申请退回
     * 3=已退回
     *
     * @param userId
     * @return
     */
    Map<String, Object> getShopRegStatusByUserId(@Param("userId") Long userId);
}
